#include<bits/stdc++.h>
using namespace std;
int n,a[100005],c,b;
void f(int x,int y)
{
    if(a[x]>a[y])
        c++,b--;
    return;
}
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)
        scanf("%d",&a[i]);
    c=1,b=n;
    sort(a+1,a+n+1);
    for(int i=1;i<=n;i++)
    {
        if(i==c)
            continue;
        else
            f(i,c);
    }
    cout<<b;
    return 0;
}
